package com.share.design.stratege;

/**
 * author:caifan
 * date:2020/2/3
 */
public class StrategyClient {
    public static void main(String[] args) {
        StrategyContext context = new StrategyContext();
        Strategy strategyA = new StrategyA();
        context.setStrategy(strategyA);
        context.strategyMethod();

        StrategyB strategyB = new StrategyB();
        context.setStrategy(strategyB);
        context.strategyMethod();
    }
}
